package wsz.kafka.service;

import org.springframework.stereotype.Service;
import wsz.kafka.entity.Job;

import javax.annotation.PostConstruct;
import java.util.ArrayList;
import java.util.List;

/**
 * @author wsz
 * @date 2022/3/17 13:52
 **/
@Service
public class JobServiceImpl {

    private List<Job> dataList = new ArrayList<>();

    /**
     * 模拟数据库调用
     */
    @PostConstruct
    public void initData() {
        for (int i=0; i< 1; i++) {
            dataList.add(new Job(i, "job name" + i));
        }
    }

    public List<Job> findAll() {
        return dataList;
    }
}
